As background for my invention it is noted that many neural networks have been implemented in integrated circuits, (1-3) for example, and that there are examples of such networks with optical inputs via photodetectors (4-9). I point out that all such networks have either had built into them the ability to be modified at will, or have a very restrictive implementation with a resistive network for calculating the Laplacian, or spatial derivative. Therefore, this prior art either has the capability I am espousing, but with a much more complicated implementation circuit and thus, consumes more integrated circuit area, or does not have the computational capability of my invention.